import random  # 导包，随机数
# i = 0
# while i < 10:
#     print("666")
#     i += 1
# count = 0
# while 1:
#     computer = random.randint(1, 3)
#     # print(type(computer))
#     user = int(input("玩家出拳(石头1，剪刀2，布3，退出0)："))
#     if user == 0:
#         print('退出')
#         break
#     print(f"电脑出拳：{computer}")
#     if (user == 1 and computer == 2) or (user == 2 and computer == 3) or (user == 3 and computer == 1):
#         print("恭喜玩家获胜！")
#         count += 1
#         if count == 3:
#             break
#     elif user == computer:
#         print("平局！")
#     else:
#         print('电脑获胜！')
# sum = 0
# i = 0
# while i <= 100:
#     sum += i
#     i = i + 1
# print(sum)
# num = 0
# for i in range(101):
#     num = num + i
# print(num)

# while 1:
#     user = input("请输入用户名：")
#     if user == 'exit':
#         print('退出')
#         break
#     pwd = input("请输入密码：")
#     if user =='admin' and pwd == '123456':
#         print('登录成功')
#         break
#     else:
#         print('用户名密码错误！')

# user = int(input("请输入年龄："))
# if 100>user>65:
#     print('可以退休了！')
# else:
#     print('小伙子加油干！')

# user = int(input("请输入年龄："))
# if 0<=user<=17:
#     print("青少年")
# elif user<=35:
#     print("青年")
# elif user<=59:
#     print("中年")
# elif user<=99:
#     print("老年")
# else:
#     print('输入错误！')

# day = int(input('请输入数字：'))
# if 6<=day<=7:
#     print("周末")
# else:
#     print('工作日')

# year = int(input('请输入年份：'))
# if (year % 4 ==0 and year % 100 != 0) or year % 400 ==0:
#     print(f'{year}是闰年')
# else:
#     print(f'{year}不是闰年')
num = random.randint(1,100)  # 50
 # 80
# while 1:
#     user = int(input('请输入数字：'))
#     if user == num:
#         print("猜对了")
#         break
#     elif user > num:
#         print('猜大了')
#     elif user < num:
#         print('猜小了')
